# vipw(8) and vigr completion                              -*- shell-script -*-

_vipw()
{
    local cur prev words cword
    _init_completion || return

    case $prev in
        --help | -!(-*)h)
            return
            ;;
        --root | -!(-*)R | -d)
            _filedir -d
            return
            ;;
    esac

    COMPREPLY=($(
        compgen -W '$(_parse_help "$1" || _parse_usage "$1")' -- "$cur"
    ))
} &&
    complete -F _vipw vipw vigr

# ex: filetype=sh
